﻿CREATE PROCEDURE [RestartFramework].[PutETLJobStageComplete]
		@pETLJobName		SYSNAME
,		@pEtlJobStageName	SYSNAME
AS
BEGIN
		SET NOCOUNT ON;
		UPDATE	[RestartFramework].[ETLJobStage]
		SET		[ETLJobStageIsComplete]	=	CAST(1 AS BIT)
		WHERE	[ETLJobStageName]		=	@pEtlJobStageName
			AND	[ETLJobId]				IN	(	SELECT	ej.[ETLJobId]
												FROM	[RestartFramework].[ETLJob] ej
												WHERE	ej.[ETLJobName]	=	@pETLJobName
											)
		;
END